import defaultOption from '@/const/crud/defaultOption'

export function initFormOption() {
    const formOption = {
        labelWidth: 180,
        // submitBtn: true,   // 提交按钮
        // submitText: "测试数据库连接",
        column: [
            {
                span: 8,
                label: '属性名称',
                prop: 'a',
                type: 'input'
            },
            {
                span: 8,
                label: '文件属性置换',
                prop: 'b',
                type: 'select',

                dicData: [{
                    value: 'XML',
                    label: 'XML'
                },
                {
                    value: '2',
                    label: '2'
                }],
            },
            {
                span: 8,
                label: '安全性级别',
                prop: 'czxc',

            },
            {
                span: 8,
                label: '描述',
                prop: 'cas',

            },
            {
                span: 8,
                label: '仅全局',
                prop: 'czb',
            },
            {
                span: 8,
                label: '用户定义',
                prop: 'fghc',
            },
            {
                span: 8,
                label: '全局值',
                prop: 'fgh',
            },
            {
                span: 8,
                label: '仅实例',
                prop: 'fghc',
            },
            {
                span: 8,
                label: '允许空值',
                prop: 'fgh',
            },
            {
                span: 8,
                label: '当前值',
                prop: 'gfgh',
            },
            {
                span: 8,
                label: '允许联机变更',
                prop: 'asdc',

            },
            {
                span: 8,
                label: '数据类型',
                prop: 'c'
            },
            {
                span: 8,
                label: 'Maximo缺省值',
                prop: 'nzxc',
            },
            {
                span: 8,
                label: '已加密',
                prop: 'c'
            },
            {
                span: 8,
                label: '屏蔽',
                prop: 'nzxc',
            },

        ]
    }
    return defaultOption(formOption, 'defaultListFormOption')
}

export function initListTableOption() {
    const listTableOption = {
        index: true,
        delBtn: true,
        menu: true,
        column: [
            {
                label: "属性名称",
                width: 200,
                prop: "1",
                slot: true,
                headerslot: true,
            },
            {
                label: "描述",
                prop: "2",
                headerslot: true,
            },
            {
                label: "当前值",
                prop: "3",
                headerslot: true,
            },
        ]
    }
    return defaultOption(listTableOption, 'defaultListTableOption')
}


export function initListoption(companyId) {
    const listTableOption = {
        editBtn: true, // 表格修改按钮
        delBtn: true,  // 表格删除按钮
        menuWidth: 200, // 操作栏宽度
        defaultSort: {
            prop: 'id',
            order: 'descending'
        },
        column: [
            {
                label: '流水号',
                prop: 'id',
                sortable: true,
                headerslot: true,
            },
            {
                label: '测试12',
                prop: 'd',
                headerslot: true,
            },
            {
                label: '测试1223',
                prop: 'b',
                headerslot: true,
            },
            {
                label: '测试9',
                prop: 'c',
                headerslot: true,
            },
            {
                label: '测试122',
                prop: 'e',
                headerslot: true,
            },
        ]
    }
    return defaultOption(listTableOption, 'defaultListTableOption')
}
export function initlistFormOption(companyId) {
    const listFormOption = {
        labelWidth: 140,
        column: [
            {
                label: "测试121",
                prop: "model_id",
                headerslot: true,
            },
            {
                label: "测试126",
                prop: "model_desc",
                headerslot: true,
            },
            {
                label: "测试1212",
                prop: "model_status",
            },
            {
                label: "测试127",
                prop: "create_date",
                headerslot: true,
            },
        ]
    }
    return defaultOption(listFormOption, 'defaultListFormOption')
}




